home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: razine@aol.com (Razine)
- Newsgroups: comp.lang.c
- Subject: Re: Convert String to Int?
- Date: 4 Mar 1996 17:48:53 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4hfs0l$k2i@newsbf02.news.aol.com>
- References: <4hf3sk$k57@hustle.rahul.net>
- Reply-To: razine@aol.com (Razine)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- I would suggest using atoi.
-
- example
-
- #include <stdio.h>
- #include <stdlib.h>
-
- int main()
- {
-
- char number[3]='999';
- int result;
-
- result=atoi(number);
- printf("Result == %d\n",result);
- return 0;
-
- }
-